Referring to FIG. 1, Data Encryption Standard (DES) algorithm is a technique that uses symmetric encryption, i.e., identical keys are used for both encryption and decryption.
The encryption process mainly involves an input unit 91 inputting a plain text 901 and a key 902 into a block cipher 92, and the block cipher 92 using an internal encryption process to convert the plain text 901 into a cipher text 903, which is subsequently outputted by an output unit 93.
Referring to FIG. 2, detailed encryption steps of the DES technique are: inputting a 64-bit plain text; subjecting the plain text to an initial permutation procedure 801, then to an encryption operation procedure 802, where the encryption operation procedure 802 includes sixteen rounds of encryption operation steps 804; and finally to another permutation, which is the inverse of initial permutation procedure 803.
The initial permutation procedure 801 involves rearranging the order of each bit of data in the 64-bit plain text in accordance with an initial permutation (IP) table.
Each round of the encryption operation steps 804 of the encryption operation procedure 802 mainly involves dividing the 64-bit data into two portions of 32-bit data, namely a right-half portion of data (Ri) and a left-half portion of data (Li); after inputting the right-half portion of data (Ri) and a sub-key (Ki+1) into a function (f) for computation, performing a bitwise exclusive OR (bitwise XOR) operation on the result of the function (f) computation and the left-half portion of data (Li), and making the result of the bitwise XOR operation the right-half portion of data (Ri+1) for the next round of the encryption operation steps 804; and making the original right-half portion of data (Ri) the left-half portion of data (Li+1) for the next round of the encryption operation steps 804.
The inverse of initial permutation procedure 803 involves rearranging the order of each bit of data in the operation result of the encryption operation procedure 802 in accordance with an inverse of initial permutation (IP-1) table for subsequent output as a cipher text.
Referring to FIG. 3, the processing method of the function (f) involves performing an expansion operation on a 32-bit data (Ri), in which the order of each bit of data is rearranged in accordance with a lookup expansion operation chart (E), thereby expanding the 32-bit data (Ri) into a 48-bit data E(Ri). The expansion operation chart (E) is as illustrated in Table 1.
TABLE 13212345456789891011121312131415161716171819202120212223242524252627282928293031321
Subsequently, a bitwise XOR operation is performed on the expanded data E(Ri) and the sub-key (Ki+1). Result obtained from the bitwise XOR operation is evenly allocated to eight substitution boxes, S-boxes, (S1˜S8) for a series of selection operations. Each of the S-boxes (Sj) has a different substitution table whose mechanism involves: taking the first and last bits (i.e., two bits) of a 6-bit input data as a row number of the substitution table (4 rows in total); taking the middle four bits of the 6-bit input data as a column number of the substitution table (16 columns in total); and locating a corresponding output data content to serve as a new bit value by taking the row number and the column number as coordinates.
Table 2 is the substitution table of S-box (S1). Suppose that the 6-bit input data of S-box (S1) is (0 1101 1)2, the substitution method considers this 6-bit input data as an index, where the first and last bits (01)2 represent the row 1 in Table 2 (since (01)2=1), and the middle four bits (1101)2 represent the column 13 in Table 2 (since (1101)2=13). Consequently, referring to coordinates (row 1, column 13) in Table 2, a value 5 is obtained, which after converting into a 4-bit output data is (0101)2 (since 5=0101)2). Because there are eight S-boxes (Sj) in total, it can be seen from the above that 6*8=48 bits are inputted, and 4*8=32 bits are outputted. Therefore, after the selection process of each of the S-boxes (Sj), the overall output is restored back to 32 bits in length.
TABLE 2ColumnRow012345678910111213141501441312151183106125907101574142131106121195382411481362111512973105031512824917511314100613
Lastly, the overall output of all of the S-boxes (Sj) needs to go through a permutation operation, whose method involves rearranging the location of each bit of data of the 32 bits in accordance with a permutation table (P), the result of which is the output of the function (f). Arrangement indices of the permutation table (P) are as shown in Table 3.
TABLE 31672021291228171152326518311028241432273919133062211425
As for the decryption process, it is the reverse of the encryption process, where a cipher text can be restored back to its original plain text through reverse operations carried out in the encryption process.
As can be seen from the above, the function (f) computation requires undergoing the steps of a bit expansion operation, a bitwise exclusive OR operation, a series of selection operations and a permutation operation, where limited to the existing standard processing procedure, each S-box (Sj) in the selection operations can only output 4 bits each time. However, as the bit processing capability of central processing units (CPU) improves continuously, higher bits of data can be processed during each computation. Therefore, when a central processing unit with a higher-bit (e.g., 8-bit, 16-bit, or 32-bit) processing capability is used, the processing capability thereof cannot be fully utilized.